class prime
{
public static void main(String args[])
{
int e=0;
for(int i=0;i<=100;i++)
{
if(i%2==0)
e++;
}

System.out.println("The no. of even numbers in between 0 and 100 is " +  (e-1));

int p=0,count,num;
for(int i=0;i<1000;i++)	
{
	num=i;
	count=0;
	for(int x=1;x<num && count<=1;x++)
	if(num%x==0)
	count++;
	if(count<=1)
	p++;
	}
System.out.println("The number of prime numbers inbetween 0 and 1000 is " + p);

int odd=0;
for(int i=0;i<=1000;i++)
	{
	if(i%2!=0)
	odd++;
	}
System.out.println("The number of odd numbers inbetween 0 and 1000 is " +  odd);

int i=0,m=0;
int[] a = new int[num];
while(i<num)
	{
	int j=1;
	count=0;
	while(j<=i)
	{
	if(i%j==0 && count<=2)
		count++;
		j++;
	}
	if(count==1 || count==2)
		{
		a[m]=i;
		m++;
		}
	i++;
	}
return (a);
}
}